<?php

define('GODHOUSE_ABOUT_ID', 148);	// 关于我们分类ID
define('GODHOUSE_ABOUT_CONTACT', 73);	// 联系我们
define('GODHOUSE_ABOUT_COMPANY', 72);	// 公司简介

class AboutController extends DefaultModuleController {

	public function actionContact() {
		$this->article(GODHOUSE_ABOUT_CONTACT);
	}
	
	public function actionCompany() {
		$this->article(GODHOUSE_ABOUT_COMPANY);
	}
	
	private function article($id) {
		$article = $this->ArticleModel->findByPk($id);
		$this->view->assign('article', $article);
		$this->view->assign('aboutType', $_GET['a']);
		$this->display('about');
	}
	
	
	private function _showAboutMenu() {
		$articleList = $this->ArticleModel->findAll("categoryId='".GODHOUSE_ABOUT_ID."'");
		$this->view->assign('articleList', $articleList);
	}
}